<script setup lang="ts">
import { inject } from 'vue'

  // 通过 inject 接收并使用 Provide 注入的值
  const childCount = inject('count')
  const childCountFunc = () => {
    childCount.value += 1
  }
</script>

<template>
  <div class="child-page" style="padding: 50px; border: 10px solid #ccc">
    child 组件{{ childCount }}  <button @click="childCountFunc">修改count</button>
  </div>
</template>